<script lang="ts" setup>
import { useProfile } from '@/stores'

const profile = useProfile()

function handleSetToken() {
  uni.setStorageSync('token', '')
  uni.setStorageSync('userInfo', {
    id: 19940,
    orgId: 31,
    createtime: 1729737453,
    phone: 19000000000,
    header: 'https://gw.alipayobjects.com/mdn/rms_1bde6f/afts/img/A*nyU6QLX40OEAAAAAAAAAAAAAARQnAQ',
    uname: '小麋鹿',
    name: '开发Z',
    zfbUserId: '2088902112371583',
    zfbUser: '{"response":{"code":"10000","msg":"Success","avatar":"https:\\/\\/gw.alipayobjects.com\\/mdn\\/rms_1bde6f\\/afts\\/img\\/A*nyU6QLX40OEAAAAAAAAAAAAAARQnAQ","city":"","countryCode":"","gender":"","nickName":"小麋鹿","province":""}}',
    openid: null,
    idCard: '350301199406240033',
    idCardUrl: '["https://bs.xdz.mdm.gold/upload/2024/10/dc901b07970d4589b782d81d7fb68fa1.JPEG","https://bs.xdz.mdm.gold/upload/2024/10/d65a7c4987a74aee89a3e89b5876cf34.JPEG","https://bs.xdz.mdm.gold/upload/2024/10/4e625941998d48ee8dc962f93473aeae.JPEG"]',
    email: 'u@m.com',
    messageTemplateType: null,
    otherAppId: null,
    contractUserInfo: '{"back": {"data": {"issue": {"data": "莆田市公安局秀屿分局", "desc": "签发机关"}, "endDate": {"data": "20280316", "desc": "有效期止"}, "startDate": {"data": "20180316", "desc": "有效期起"}}, "image": "https://bs.xdz.mdm.gold/upload/2024/10/d65a7c4987a74aee89a3e89b5876cf34.JPEG"}, "face": {"data": {"num": {"data": "350301199406240033", "desc": "身份证号"}, "sex": {"data": "男", "desc": "性别"}, "name": {"data": "戴俊杰", "desc": "姓名"}, "birth": {"data": "1994年6月24日", "desc": "出生日期"}, "address": {"data": "福建省莆田市秀屿区笏石镇岭美村大埔19号", "desc": "住址"}, "nationality": {"data": "汉", "desc": "民族"}}, "image": "https://bs.xdz.mdm.gold/upload/2024/10/dc901b07970d4589b782d81d7fb68fa1.JPEG"}}',
    platform: 2,
    currentLoginTime: 1730878833401,
    expirationTime: 1731742833412,
  })
  profile.init()
}
</script>

<template>
  <button @click="handleSetToken">写入token</button>
</template>

<style lang="less" scoped></style>
